/*
 * Created on 28/mag/07
 *
 * To change the template for this generated file go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
package it.unibo.deis.lia.mmhc.test;

import java.net.*;
import java.io.*;

public class MMHCTestClientThroughput extends Thread {

	public static void main(String argv[]) throws Exception {
		MMHCTestClientThroughput macTest = new MMHCTestClientThroughput();
		macTest.start();
	}

	public void run() {
		try {
			Socket s = new Socket("137.204.57.176", 3333);
			OutputStream os = s.getOutputStream();

			int totalByte = 0;
			byte[] buffer = new byte[1024];
			while (totalByte < 1024 * 1024) {
				os.write(buffer);
				totalByte = totalByte + buffer.length;
				// System.out.println("totalByte "+totalByte);
			}
			s.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
